package i_oStream.zipEntryStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.zip.ZipInputStream;

public class ZipEntry {
    public static void main(String[] args) throws IOException {
        //创建对象，将文件目录指向
        File srt = new File("C:\\Users\\徐睿奇\\Desktop\\徐睿奇\\VID_20230121_212439.zip");
        File name = new File("C:\\Users\\徐睿奇\\Desktop\\徐睿奇");
        outputZip(srt, name);
    }

    private static void
    outputZip(File srt, File name) throws IOException {
        ZipInputStream zip = new ZipInputStream(new FileInputStream(srt));
        java.util.zip.ZipEntry ze;
        while ((ze = zip.getNextEntry()) != null) {
            if (ze.isDirectory()) {
                File file = new File(name, ze.toString());
            }
        }
    }
}
